from fastapi import APIRouter,Depends

from app.api.api_v1.front import goods_api, login_api, payment_api,payment_callback,\
    posts_api,parcel_api,cart_api,orders_api, locale_api

from app.api.api_v1.common import package_type_api
from app.api.deps import authorization

api_router = APIRouter(dependencies=[Depends(authorization)])#dependencies=
api_router.include_router(goods_api.router,prefix="/item", tags=["商品接口"])
api_router.include_router(cart_api.router,prefix="/card", tags=["购物车"])
api_router.include_router(orders_api.router,prefix="/order", tags=["订单"])
api_router.include_router(payment_api.router,prefix="/payment", tags=["支付接口"])
api_router.include_router(parcel_api.router,prefix="/parcel",tags=["包裹接口"])

no_middle_router = APIRouter()
no_middle_router.include_router(login_api.router,prefix="/auth", tags=["登录注册"])
no_middle_router.include_router(posts_api.router,prefix="/post",tags=["内容"])
no_middle_router.include_router(payment_callback.router,prefix="/pay", tags=["支付回调"])
no_middle_router.include_router(locale_api.router,prefix="/locale", tags=["语言币种"])
no_middle_router.include_router(package_type_api.router,prefix="/common", tags=["包裹类型"])

#用户中信
from app.api.api_v1.front.my import user_express_api,user_profile_api,package_api

user_router = APIRouter(dependencies=[Depends(authorization)])
user_router.include_router(user_profile_api.router,prefix="/user", tags=["个人信息"])
user_router.include_router(package_api.router,prefix="/user", tags=["包裹"])
user_router.include_router(user_express_api.router,prefix="/user",tags=["物流"])
